#include<iostream>
using namespace std;
class CPeople {
protected:
	string name;
	char gender;
	int age;
public:
	CPeople() {
	}
	CPeople(string _name, char g, int a):name(_name),gender(g),age(a) {
	}
	void print() {
		cout << "People:" << endl;
		cout << "Name: " << name << endl;
		cout << "Sex: " << gender << endl;
		cout << "Age: " << age << endl << endl;
	}
};
class CStudent :virtual public CPeople {
protected:
	string number;
	double score;
public:
	CStudent() {
	}
	CStudent(string _name, char g, int a, string _number, double s) :CPeople(_name, g, a), number(_number), score(s) {
	}
	void print() {
		cout << "Student:" << endl;
		cout << "Name: " << name << endl;
		cout << "Sex: "  << gender << endl;
		cout << "Age: " << age << endl;
		cout << "No.: " << number << endl;
		cout << "Score: " << score << endl;
		cout << endl;
	}
};
class CTeacher:virtual public CPeople {
protected:
	string Position;
	string Department;
public:
	CTeacher() {
	}
	CTeacher(string _name, char g, int a, string position, string department) :CPeople(_name, g, a), Position(position), Department(department) {
	}
	void print() {
		cout << "Teacher:" << endl;
		cout << "Name: " << name << endl;
		cout << "Sex: "  << gender << endl;
		cout << "Age: " << age << endl;
		cout << "Position: " << Position << endl;
		cout << "Department: " << Department << endl;
		cout << endl;
	}
};
class CGradOnWork :public CStudent, public CTeacher {
protected:
	string Direction;
	string Tutor;
public:
	CGradOnWork(string _name, char g, int a, string _number, double s, string position, string department, string direction, string tutor) {
		name = _name;
		gender = g;
		age = a;
		number = _number;
		score = s;
		Position = position;
		Department = department;
		Direction = direction;
		Tutor = tutor;
	}
	void print() {
		cout << "GradOnWork:" << endl;
		cout << "Name: " << name << endl;
		cout << "Sex: " << gender << endl;
		cout << "Age: " << age << endl;
		cout << "No.: " << number << endl;
		cout << "Score: " << score << endl;
		cout << "Position: " << Position << endl;
		cout << "Department: " << Department << endl;
		cout << "Direction: " << Direction << endl;
		cout << "Tutor: " << Tutor;
	}
};
int main()
{
	string name;
	char gender;
	int age;
	string number;
	double score;
	string Position;
	string Department;
	string Direction;
	string Tutor;
	cin >> name >> gender >> age;
	cin >> number >> score;
	cin >> Position >> Department;
	cin >> Direction >> Tutor;
	CPeople c1(name, gender, age);
	c1.print();
	CStudent c2(name, gender, age, number, score);
	c2.print();
	CTeacher c3(name, gender, age, Position, Department);
	c3.print();
	CGradOnWork c4(name, gender, age, number, score, Position, Department, Direction, Tutor);
	c4.print();
	return 0;
}